﻿@model GameSchoolWeb.Models.ExamIndexModelView
<div id="templatemo_content">
    @{
        ViewBag.Title = "Skila inn prófi";
    }
    <div class="templatemo_box">
        <!DOCTYPE html>
        <html>
        <head>
            <title>ExamDetails</title>
        </head>
        <body>
            <h2>
                Netpróf</h2>
            <div class="body">
                <fieldset>
                    @Html.HiddenFor(model => model.Exam.id)
                    <div class="display-label">
                        <strong>Heiti prófs</strong></div>
                    <div class="display-field">
                        @Html.DisplayFor(model => model.Exam.strTitle)
                    </div>
                    <div class="display-label">
                        <strong>Dagsetning</strong></div>
                    <div class="display-field">
                        @Html.DisplayFor(model => model.Exam.dDateAdded)
                    </div>
                    <div class="display-label">
                        <strong>Möguleg stig</strong></div>
                    <div class="display-field">
                        @Html.DisplayFor(model => model.Exam.nPoints)
                    </div>
                    @using (Html.BeginForm())
                    {
                        foreach (var item in Model.Question)
                        {
                        <div class="display-label">
                            <strong>Spurning</strong></div>
                        <div class="display-field">@Html.DisplayFor(model => item.strTitle)
                        </div>
		
                        <div class="display-label">
                            <strong>Valmöguleiki 1</strong></div>
                        <div class="display-field">
                            @Html.RadioButton(item.id.ToString(), "1", false) @Html.DisplayFor(model => item.striOptionOne)
                        </div>

                        <div class="display-label">
                            <strong>Valmöguleiki 2</strong></div>
                        <div class="display-field">
                            @Html.RadioButton(item.id.ToString(), "2", false) @Html.DisplayFor(model => item.strOptionTwo)
                        </div>

                        <div class="display-label">
                            <strong>Valmöguleiki 3</strong></div>
                        <div class="display-field">
                            @Html.RadioButton(item.id.ToString(), "3", false) @Html.DisplayFor(model => item.strOptionThree)
                        </div>

                        <div class="display-label">
                            <strong>Valmöguleiki 4</strong></div>
                        <div class="display-field">
                            @Html.RadioButton(item.id.ToString(), "4", false) @Html.DisplayFor(model => item.strOptionFour)
                        </div>
	
                        <div class="display-label">
                            <strong>Valmöguleiki 5</strong></div>
                        <div class="display-field">
                            @Html.RadioButton(item.id.ToString(), "5", false) @Html.DisplayFor(model => item.strOptionFive)
                        </div>
                        }
                        <p>
                            <input type="submit" value="Skila" />
                        </p>
		
	
	
                    }
                </fieldset>
                @if (User.IsInRole("kennari"))
                {
                    <p>
                        @Html.ActionLink("Edit", "Edit", new { id = Model.Exam.id })
                    </p>
                }
                <p>
                    @*@Html.ActionLink("Bæta við spurningu", "AddQuestions", new { id = Model.Exam.id })*@
                    @Html.ActionLink("Til baka", "GetExams")
                </p>
            </div>
            <div class="box_bottom">
                <span></span>
            </div>
    </div>
</div>
</body> </html> 